package com.flatfish.acvsystem.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.commons.CommonsMultipartFile;

import com.flatfish.acvsystem.service.IVerifyService;

@Controller
@RequestMapping(value="verifyApk")
public class VerifyApkController {
	
	@Autowired
	private IVerifyService verifyService;

	@RequestMapping(value="verifyApk.do", method=RequestMethod.POST)
	public String vefifyApk(@RequestParam("fileUpload") CommonsMultipartFile[] files) {
		if(null==files) return "error";
		verifyService.verityApkByFile(files);
		return "dataSuccess";
	}
	
	@RequestMapping(value="upload.do", method=RequestMethod.GET)
	public String upload() {
		return "upload";
	}
	
}
